package com.daowen.filter;

import com.daowen.entity.Dingdanitems;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpSession;
import java.util.List;

public class DingDanFilter extends AbstractInterceptor {
    @Override
    public String intercept(ActionInvocation actionInvocation) throws Exception {
        actionInvocation.invoke();
        HttpSession session= ServletActionContext.getRequest().getSession();
        List<Dingdanitems> temlist= (List<Dingdanitems>) session.getAttribute("cart");//获得订单
        return null;
    }
}
